<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>购物车</title>
	<link rel="stylesheet" href="../css/common.css">
	<link rel="stylesheet" href="../css/cart.css">
	<script src="../libs/require.js" data-main="../js/cart"></script>
</head>
<body>
    <div class="site-header">
		<div class="container">
			<div class="header-logo">
				<a href="../index.html"></a>
			</div>
			<div class="header-title">
				<h2>我的购物车</h2>
				<p>温馨提示：产品是否购买成功，以最终下单为准哦，请尽快结算</p>
			</div>
		</div>
	</div>
	<div class="mi-cart page-main">
		<div class="cart-goods-list">
			<div class="list-head">
				<div class="col-check">
					<input type="checkbox"  id="all">
					<label for="all">全选</label>
				</div>
				<div class="col-img"></div>
				<div class="col-name">商品名称</div>
				<div class="col-price">单价</div>
				<div class="col-num">数量</div>
				<div class="col-total">小计</div>
				<div class="col-action">操作</div>
			</div>
			<div class="list-body">
			</div>
		</div>
		<div class="cart-bar">
			<div class="section-left">
				<a href="../index.html">继续购物</a>
				<span class="cart-num">
					共<i class="totalNum"></i>件商品
					已选择<i class="selectNum"></i>件商品
				</span>
			</div>
			<span class="totalPrice">
				合计
				<em></em>
				元
				<a href="./confirm.html">去结算</a>
			</span>
		</div>
	</div>
	<script type="text/html" id="shop-template">
		{{each carts cart}}
			<div class="unit" data-id="{{cart.id}}">
				<div class="shopping-check">
					<input type="checkbox">
				</div>
				<div class="shopping-img">
					<img src="{{cart.image}}" alt="">
				</div>
				<div class="shopping-name">
					<span class="config">{{cart.config}}</span>
					<span class="color">{{cart.color}}</span>
				</div>
				<div class="shopping-price">
					<span class="price">{{cart.curPrice}}</span>
				</div>
				<div class="shopping-num">
					<div class="num">
						<button class="ins">+</button>
						<input type="text" value="{{cart.amount}}">
						<button class="des">-</button>
					</div>
				</div>
				<div class="shopping-total">
					<span class="subTotalPrice">{{cart.curPrice.slice(0,cart.curPrice.length-1)*cart.amount}}</span>
					元
				</div>
				<div class="shopping-del">
					<button class="del">删除</button>
				</div>
			</div>
		{{/each}}
	</script>
</body>
</html>